When a smoothed image obtained by blurring an image is generated in digital image processing, there is conventionally used a technique for using the average value of the level (gradation) values of pixels within a filter size as the signal level of a target pixel by using a low-pass filter. However, when using a low-pass filter, an edge portion that has a large difference between level values also becomes dim because the average value of the level values of the pixels within a filter size is used as the signal level of a target pixel.
Specifically, as illustrated in FIG. 15, when using a low-pass filter, a gradient for an edge portion having a large brightness difference in a process target image that is indicated by the solid line gets dull in the case of a low-pass filter image (LPF image in the present drawing) output from the low-pass filter that is indicated by the dotted line, and thus it is impossible to hold the edge portion.
Consequently, various technologies for accurately saving an edge portion and blurring the other portions are disclosed. A technology related to a face image processing apparatus (image processing apparatus) that uses an epsilon filter (ε filter) has been known as disclosed in, for example, Japanese Laid-open Patent Publication No. 2000-105815.
Specifically, as illustrated in FIG. 16, the face image processing apparatus uses a pixel located at an image coordinate (m, n) as a target pixel and uses eight pixels (in this case, coordinate (m−1, n−1), coordinate (m, n−1), coordinate (m+1, n−1), coordinate (m−1, n), coordinate (m+1, n), coordinate (m−1, n+1), coordinate (m, n+1), and coordinate (m+1, n+1)) that are surrounding pixels of the target pixel as peripheral pixels, and then computes the difference between the level value (for example, the gradation value of a luminance signal) of the target pixel and the level value of each peripheral pixel. The face image processing apparatus extracts a peripheral pixel for which the computed difference is smaller than a predetermined threshold value, and then outputs a value obtained by adding a pixel value, which is obtained by multiplying the signal level of the extracted peripheral pixel by a predetermined coefficient, to the pixel value of the target pixel as a pixel value of the target pixel.
In this manner, with attention to each pixel of the input image, the level width of the gradation value can be limited by using only a peripheral pixel for which the difference with the level value of the noticed pixel (target pixel) is smaller than the threshold value as a target that is processed by a smoothing process. Therefore, as illustrated in FIG. 17, the gradient of the edge portion of an epsilon filter image output from an epsilon filter that is indicated by the dotted line does not get dull and the edge portion of a process target image indicated by the solid line is accurately saved. As a result, the other portions except for the edge portion can be blurred.
However, because the above conventional art has a large processing load, there is a problem in that a process cannot be speeded up. Specifically, a conditional branch process for using each pixel of an input image as a target pixel, extracting a difference between the level value of each target pixel and the level value of the peripheral image of each target image, and determining whether the difference is smaller than a threshold value is performed. As a result, a process cannot be speeded up because a processing load is large.